package cn.itcast.mapper;

import cn.itcast.pojo.EmpLoginLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Mapper
public interface EmpLogMapper {


    //添加EmpLoginLog中的数据
    @Insert("insert into emp_login_log(username,password,login_time,is_success,jwt,cost_time) values(#{username},#{password},#{loginTime},#{isSuccess},#{jwt},#{costTime})")
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void insertLog(EmpLoginLog empLoginLog);
}
